@extends('admin.app')


@section('content')
    <div class="panel panel-default">
        <div class="panel-heading font-bold">
            项目类型列表
        </div>
        <div class="row wrapper">
            <div class="col-sm-10">
                <form class="form-horizontal" method="get"
                      action="{{ admin_action('Web\CooController@userInvestInfo') }}">
                    <div class="row">
                        <div class="col-sm-11">
                            <div class="form-group">
                                <label class="control-label col-sm-2">投资开始时间</label>
                                <div class="col-sm-4">
                        <input type="text" class="form-control datetimepicker" name="start_time"
                               value="{{ $args['start_time'] }}" placeholder="投资开始时间">
                                </div>

                                <label class="control-label col-sm-2">投资结束时间</label>
                                <div class="col-sm-4">
                        <input type="text" class="form-control datetimepicker" name="end_time"
                               value="{{ $args['end_time'] }}" placeholder="投资结束时间">

                                </div>
                            </div>
                        </div>
                        <div class="col-sm-1 text-left">
                    <span class="input-group-btn">
                      <button class="btn btn-sm btn-default" type="submit">查询</button>
                    </span>
                    <span class="input-group-btn">
                    </span>
                        </div>
                    </div>
                </form>
            </div>
            <div class="col-sm-2 text-right text-center-xs">
                    <a href="{{ admin_action('Web\CooController@userInvestInfo',
                    [
                        'download'=>'download',
                        'start_time'=>$args['start_time'],
                        'end_time'=>$args['end_time'],
                    ]) }}" class="btn btn-sm btn-primary btn-addon">
                        <i class="fa fa-download"></i>excel导出查询结果
                    </a>
            </div>
        </div>
        <div class="table-responsive">
            <table class="table table-striped b-t b-light">
                <thead>
                <tr>
                    <th>营销机构</th>
                    <th>经纪人ID</th>
                    <th>经纪人名称</th>
                    <th>投资人ID</th>
                    <th>投资人姓名</th>
                    <th>项目名称</th>
                    <th>项投资金额(元)</th>
                    <th>项目周期</th>
                    <th>项目周期类型</th>
                    <th>收益率</th>
                    <th>投资时间</th>
                    <th>项目成立时间</th>
                    <th>还款到期时间</th>
                    <th>交易状态</th>
                </tr>
                </thead>
                <tbody>
                @forelse ($data as $d)
                    <tr>
                    	<td>{{ $d->company_name }}</td>
                    	<td>{{ $d->broker_id }}</td>
                    	<td>{{ $d->broker_name }}</td>
                    	<td>{{ $d->user_id }}</td>
                    	<td>{{ $d->name }}</td>
                    	<td>{{ $d->projects_name }}</td>
                    	<td>{{ $d->invest_money }}</td>
                    	<td>{{ $d->finance_time_num }}</td>
                    	<td>{{ $d->finance_time_cate }}</td>
                    	<td>{{ $d->auto_rate }}</td>
                    	<td>{{ $d->invest_time }}</td>
                    	<td>{{ $d->interest_at??'--' }}</td>
                    	<td>{{ $d->trade_repayment_date }}</td>
                    	<td>{{ $d->status }}</td>
                    </tr>
                @empty
                    <tr>
                        <td colspan="3" class="text-center">没有找到项目类型记录</td>
                    </tr>
                @endforelse
                </tbody>
            </table>
        </div>
        <div class="panel-footer">
            <div class="row">
                <div class="col-sm-12 text-right text-center-xs">
                    {!! $links !!}
                </div>
            </div>
        </div>
    </div>
@endsection